package cn.com.surker.production.entity.vo;

import cn.com.surker.base.ExportInter;
import cn.com.surker.enums.ICodeDescEnum;
import cn.com.surker.enums.production.CountBillTypeEnum;
import cn.com.surker.enums.production.car.CarModelTypeEnum;
import cn.com.surker.enums.production.car.OverLimitEnum;
import cn.com.surker.enums.production.car.TransportTypeEnum;
import cn.com.surker.enums.production.indent.RoadTypeEnum;
import cn.com.surker.enums.system.DayPriceTypeEnum;
import cn.com.surker.enums.system.IsAutoEnum;
import cn.com.surker.excel.ExcelCell;
import cn.com.surker.production.entity.TranDayPrice;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 运输日产值表
 * @author luotao
 * @date 2024/12/16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TranDayPriceVo extends TranDayPrice implements ExportInter {

	/**
	 * 运输合同名称
	 */
	@ExcelCell(value = "运输合同", sort = 0)
	private String tranConName;
	/**
	 * 销售合同
	 */
	@ExcelCell(value = "工程名称", sort = 3)
	private String saleConName;

	/**
	 * 运输类型
	 */
	@ExcelCell(value = "运输类型", sort = 9)
	private String tranTypeTxt;

	public String getTranTypeTxt() {
		TransportTypeEnum anEnum = ICodeDescEnum.getEnum(TransportTypeEnum.class, getTranType());
		if (anEnum != null) {
			tranTypeTxt = anEnum.getDescription();
		}
		return tranTypeTxt;
	}

	/**
	 * 计量方式
	 */
	private String countTypeTxt;

	public String getCountTypeTxt() {
		CountBillTypeEnum anEnum = ICodeDescEnum.getEnum(CountBillTypeEnum.class, getCountType());
		if (anEnum != null) {
			countTypeTxt = anEnum.getDescription();
		}
		return countTypeTxt;
	}

	/**
	 * 车辆类型
	 */
	private String carModelTypeTxt;

	public String getCarModelTypeTxt() {
		CarModelTypeEnum anEnum = ICodeDescEnum.getEnum(CarModelTypeEnum.class, getCarModelType());
		if (anEnum != null) {
			carModelTypeTxt = anEnum.getDescription();
		}
		return carModelTypeTxt;
	}

	/**
	 * 道路类型
	 */
	@ExcelCell(value = "道路类型", sort = 8)
	private String roadTypeTxt;

	public String getRoadTypeTxt() {
		RoadTypeEnum anEnum = ICodeDescEnum.getEnum(RoadTypeEnum.class, getRoadType());
		if (anEnum != null) {
			roadTypeTxt = anEnum.getDescription();
		}
		return roadTypeTxt;
	}

	/**
	 * 是否经过超限站
	 */
	@ExcelCell(value = "是否经过超限", sort = 7)
	private String overLimitTxt;

	public String getOverLimitTxt() {
		OverLimitEnum anEnum = ICodeDescEnum.getEnum(OverLimitEnum.class, getOverLimit());
		if (anEnum != null) {
			overLimitTxt = anEnum.getDescription();
		}
		return overLimitTxt;
	}

	/**
	 * 是否人工
	 */
	private String isAutoTxt;

	public String getIsAutoTxt() {
		IsAutoEnum anEnum = ICodeDescEnum.getEnum(IsAutoEnum.class, getIsAuto());
		if (anEnum != null) {
			isAutoTxt = anEnum.getDescription();
		}
		return isAutoTxt;
	}

	//	价格类型
	@ExcelCell(value = "价格类型", sort = 16)
	private String priceTypeTxt;

	public String getPriceTypeTxt() {
		DayPriceTypeEnum anEnum = ICodeDescEnum.getEnum(DayPriceTypeEnum.class, getPriceType());
		if (anEnum != null) {
			return anEnum.getDescription();
		} else {
			return "";
		}
	}

	//	发货时间
	private Date sendTime;

	//	运输车队
	@ExcelCell(value = "运输车队", sort = 1)
	private String tranTeamName;

	//	合同单位(销售客户)
	@ExcelCell(value = "合同单位", sort = 2)
	private String saleClientName;

	//	施工部位
	@ExcelCell(value = "施工部位", sort = 4)
	private String site;
	//	砼强度
	@ExcelCell(value = "砼强度", sort = 5)
	private String strengthName;
	//	车队编码
	@ExcelCell(value = "车队编码", sort = 10)
	private String fleetCode;
	//	车自编号
	@ExcelCell(value = "车自编号", sort = 11)
	private String carCode;
	//	车牌号
	@ExcelCell(value = "车牌号", sort = 12)
	private String carNo;
	//	浇筑方式
	@ExcelCell(value = "浇筑方式", sort = 13)
	private String castMode;
	//	生产线
	@ExcelCell(value = "生产线", sort = 14)
	private String lineName;
	//	发货方量
	@ExcelCell(value = "发货方量", sort = 15)
	private Double sendStere;

	//	车队id
	private Long tranTeamId;
	//	销售合同id
	private Long saleConId;


}
